/*	
	This program is free software; you can redistribute it and/or modify 
	it under the terms of the GNU General Public License as published by 
	the Free Software Foundation; either version 2 of the License, or 
	any later version.

    	This program is distributed in the hope that it will be useful, but 
	WITHOUT ANY WARRANTY; without even the implied warranty of 
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
	General Public License for more details.

    	You should have received a copy of the GNU General Public License 
	along with this program; if not, write to the Free Software 
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
	USA
*/

void init_pic8259(void);
void abilita_irq(unsigned char irq,unsigned char port_num);
void disabilita_irq(unsigned char irq,unsigned char port_num);

struct descrittore {
	unsigned short int offset0_15;
	unsigned short int segmento;
	unsigned short int riservato:5;
	unsigned short int opzioni:11;
	unsigned short int offset16_31;
};

void init_IDT(void);
void add_idt(void (*handler)(void),int i,unsigned short opz);
void load_idt(struct descrittore* base_addr,int num_desc);
void handler_default(void);

//eccezioni
void trap0(void);
void trap1(void);
void trap2(void);
void trap3(void);
void trap4(void);
void trap5(void);
void trap6(void);
void trap7(void);
void trap8(void);
void trap9(void);
void trap10(void);
void trap11(void);
void trap12(void);
void trap13(void);
void trap14(void);
void trap15(void);
void trap16(void);
void trap17(void);
#define IDT_DIM 256
void handler_function(void);
void gestisci_irq(unsigned int esp);
void add_irq(int p,void (*handler)(void));

// irq dichiarati nel kernel
void timer();
void input_tastiera();
